Version

UltraListViewItem Constructor(Object,UltraListViewSubItem[])

Creates a new instance of the UltraListViewItem class.
Syntax
'Declaration
 
Public Function New( _
   ByVal itemValue As Object, _
   ByVal subItems() As UltraListViewSubItem _
)
public UltraListViewItem( 
   object itemValue,
   UltraListViewSubItem[] subItems
)

Parameters

itemValue
The initial value for the UltraListViewItem instance's Value property.
subItems
An array of UltraListViewSubItem instances which will be assigned to the UltraListViewItem instance's SubItems collection.
Remarks

When using this constructor, the size of the subItems array must match the size of the UltraListView control's SubItemColumns collection. If the size of the subItems array does not match the size of the SubItemColumns collection, the sub-items will be discarded when this UltraListViewItem is added to the control's Items collection. For example, if the subItems array contains three members, while the control's SubItemColumns collection contains only two, the last entry in the array will be discarded. For this reason it is best to fully populate the control's SubItemColumns collection before adding items created with this constructor.

This constructor is useful in cases where a large number of items are to be added to the the control's Items collection. Using the UltraListViewItemsCollection class' UltraListViewItemsCollection.Add method can be inefficient in these scenarios, since each time the method is called, a property change notification is issued. Typically, this constructor is used in conjunction with the UltraListViewItemsCollection class' UltraListViewItemsCollection.AddRange method, so that multiple items can be added, in an atomic operation, while triggering only one property change notification.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also